'''
A data structure of the daily data.
This data structure could also include the technical indicators which is added from
the histdata class: 
      ma : moving average
     ema : exponential moving average
     std : standard deviation
      bb : bollinger bands  
     wpr : Williams Percent Range
    macd : moving average convergence/divergence 
     env : envelopes
     rsi : relative strength index 
     roc : rate of change
      mo : momentum
Created on April, 2012
@author: bruce
'''
from datetime import date

class DailyData:
    def __init__(self, data):
        (y, m, d)   = data['Date'].split('-')
        self.dt     = date(int(y), int(m), int(d))
        self.o      = float(data['Open'])
        self.h      = float(data['High'])
        self.lo     = float(data['Low'])
        self.c      = float(data['Close'])
        self.v      = float(data['Volume'])
        self.adj_c  = float(data['Adj Close'])       
